﻿@model zichan.Entity.CabinetClass
@{
    ViewBag.Title = "添加机柜用途分类";
}

@section Pagetitle{
    @AdminCommon.PageTitle("机柜用途分类管理", "添加")
}

<div class="form-group col-md-offset-3 col-md-9">
    <input type="radio" id="selectOne" name="createType" value="one" checked />添加单个
    <input type="radio" id="selectList" name="createType" value="list" />批量添加
</div>
@using (Html.BeginForm("Create", "CabinetClass", FormMethod.Post, new { @class = "form-horizontal" }))
{
    <div class="form-body">

        @Html.AntiForgeryToken()
       
        <div class="form-group ">
            <label class="col-md-3 control-label xh">用途分类:</label>
            <div class="col-md-9">
                @Html.TextBoxFor(o => o.Purpose, new { @class = "form-control input-large" })
                <span class="help-block">
                    @Html.ValidationMessageFor(o => o.Purpose)
                </span>
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label xh">序号:</label>
            <div class="col-md-9">
                @Html.TextBoxFor(o => o.Sort, new { @class = "form-control input-small", Value = ViewBag.maxSort })

                <span class="help-block">
                    @Html.ValidationMessageFor(o => o.Sort)
                </span>
            </div>
        </div>


        <div class="form-actions">
            <div class="row">
                <div class="col-md-offset-3 col-md-9">
                    <button type="submit" class="btn green">提交</button>
                    <a href="/CabinetClass/Index" class="btn default">返回</a>
                </div>
            </div>
        </div>
    </div>
}


@section footer{
    @Scripts.Render("~/bundles/jqueryval")
    <script type="text/javascript">
    $(function () {
        $("#selectList").on("click", function () {
            window.location.href = "/CabinetClass/CreateList";
        });
    });
    </script>
}

